
/**
 * @description 上传文件配置
 * @author 穆宏宇
 * @date 2020-10-19 13:46:15
 * */

import tools from "@/tools";
import {createUuid} from "@/util/common";

// eslint-disable-next-line
const baseUrl = process.env.VUE_APP_BASE_API
var env  = process.env.NODE_ENV;
class FileConfig {
  constructor(){
    // 上传文件地址
	if(env == 'development'){
		// this.url = `${baseUrl}/dongbo/order/file/uploadfile`
		this.url = `${baseUrl}/vapi/file/uploadfile`
	}else{
		this.url = `${baseUrl}/vapi/file/uploadfile`
	}
    // 上传文件请求头
    this.headers = ()=>{
      return {
        'Authorization': tools.localRead('qiantai'),
          'Metis-InternalModule': 'aaaa',
          'Metis-ReqId':  createUuid(),
          'Metis-Tenant': '8dd10f97bc684b4fbc845c0b344883aa',
          'Metis-UserId': tools.localRead('userId')
        }
    }
  }
}

export default new FileConfig ()

